<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>程序猿的小本本 </title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">


<meta name="description" content="光说有毛用|程序猿的小本本" />

<meta name="keywords" content="">


<meta property="og:title" content="程序猿的小本本 ">
<meta property="og:site_name" content="程序猿的小本本"/>
<meta property="og:url" content="http://replace-this-with-your-hugo-site.com/" />
<meta property="og:locale" content="en-us">


<meta property="og:type" content="website" />



<link href="http://replace-this-with-your-hugo-site.com/index.xml" rel="alternate" type="application/rss+xml" title="程序猿的小本本" />

<link rel="canonical" href="http://replace-this-with-your-hugo-site.com/" />

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://replace-this-with-your-hugo-site.com/touch-icon-144-precomposed.png">
<link href="http://replace-this-with-your-hugo-site.com/favicon.png" rel="icon">
<meta name="theme-color" content="#2053AB">
<meta name="generator" content="Hugo 0.17-DEV" />

  <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<link href='https://fonts.googleapis.com/css?family=Merriweather:300%7CRaleway%7COpen+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://replace-this-with-your-hugo-site.com/css/font-awesome.min.css">
<link rel="stylesheet" href="http://replace-this-with-your-hugo-site.com/css/style.css">
<link rel="stylesheet" href="http://replace-this-with-your-hugo-site.com/css/highlight/default.css">

  
</head>
<body>
  <main id="main-wrapper" class="container main_wrapper has-sidebar">
    <header id="main-header" class="container main_header">
  <div class="container brand">
  <div class="container title h1-like">
  <a class="baselink" href="http://replace-this-with-your-hugo-site.com/">
  程序猿的小本本

</a>

</div>

  
<div class="container topline">
  
  光说有毛用


</div>


</div>

  <nav class="container nav primary no-print">
  

<a class="homelink" href="http://replace-this-with-your-hugo-site.com/">Home</a>


  
<a href="http://replace-this-with-your-hugo-site.com/about">About</a>

<a href="http://replace-this-with-your-hugo-site.com/post" title="Show list of posts">Posts</a>

<a href="http://replace-this-with-your-hugo-site.com/tags" title="Show list of tags">Tags</a>


</nav>

<div class="container nav secondary no-print">
  
<a id="contact-link-email" class="contact_link" href="mailto:chennqqi@qq.com">
  <span class="fa fa-envelope-square"></span><span>email</span></a>



<a id="contact-link-github" class="contact_link" href="https://github.com/chennqqi?tab=repositories">
  <span class="fa fa-github-square"></span><span>github</span></a>

















</div>


  

</header>


<section id="main-content" class="container main_content homepage">
  <header class="container header">
    <h1>程序猿的小本本
</h1>

    <span>last update: <time datetime="2016-01-11T14:48:49Z">11 January at 2:48pm</time>
</span>

  </header>
  
  
    <article class="container content summary">
  <div class="container hat">
  <h2><a href="http://replace-this-with-your-hugo-site.com/2016/01/11/centos_install_gitolite.html">centos安装gitolite
</a>
</h2>

  <time datetime="2016-01-11">11 Jan, 2016</time>

</div>

  <p class="container content">
  
  
    安装基础包 yum install perl openssh git yum install perl-Time-HiRes 创建git用户 useradd -d /home/git git passwd git 在git用户家目录下安装gitolite 切换到git用户 # su – git 创建文件夹bin $ mkdir bin 克隆gitolite源码 $ git clone https://github.com/sitaramc/gitolite.git $ ls bin gitolite 安装gitolite $ ./gitolite/install -to /home/git/bin/ $ cd bin/ $ ls commands gitolite gitolite-shell lib syntactic-sugar triggers VERSION VREF 配置gitolite管理员 生成管理员账户的公钥（此处指定本地root用户为管理员，键入回车使用默认值） # ssh-keygen 复制管理的公钥 # cp .ssh/id_rsa.pub /tmp/admin.pub 切换回git用户，为gitolite配置管理员 $ /home/git/bin/gitolite setup -pk /tmp/admin.pub Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/ Initialized empty Git repository in /home/git/repositories/testing.git/ WARNING: /home/git/.ssh missing; creating a new one WARNING: /home/git/.ssh/authorized_keys missing; creating a new one $ ls bin gitolite projects.list repositories 管理员日常管理 管理员clone管理库（此处为本地root用户） # git clone git@192.168.1.95:gitolite-admin Initialized empty Git repository in /root/gitolite-admin/.git/ The authenticity of host &#8216;192.168.213.130 (192.168.213.130)&#8216; can&#8216;t be established.
  


</p>


  <div class="container readlink">
  <a href="http://replace-this-with-your-hugo-site.com/2016/01/11/centos_install_gitolite.html">Read more &rarr;</a>

</div>


</article>

  
    <article class="container content summary">
  <div class="container hat">
  <h2><a href="http://replace-this-with-your-hugo-site.com/2016/01/10/using_https_in_nginx.html">使用nginx搭建https服务器
</a>
</h2>

  <time datetime="2016-01-10">10 Jan, 2016</time>

</div>

  <p class="container content">
  
  
    最近在研究nginx，整好遇到一个需求就是希望服务器与客户端之间传输内容是加密的，防止中间监听泄露信息，但是去证书服务商那边申请证书又不合算，因为访问服务器的都是内部人士，所以自己给自己颁发证书，忽略掉浏览器的不信任警报即可。下面是颁发证书和配置过程。 首先确保机器上安装了openssl和openssl-devel #yum install openssl #yum install openssl-devel &nbsp; 然后就是自己颁发证书给自己 #cd /usr/local/nginx/conf #openssl genrsa -des3 -out server.key 1024 #openssl req -new -key server.key -out server.csr #openssl rsa -in server.key -out server_nopwd.key #openssl x509 -req -days 365 -in server.csr -signkey server_nopwd.key -out server.crt 至此证书已经生成完毕，下面就是配置nginx server { listen 443; ssl on; ssl_certificate /usr/local/nginx/conf/server.crt; ssl_certificate_key /usr/local/nginx/conf/server_nopwd.key; } &nbsp; 然后重启nginx即可。 ps： 如果出现&#8221;[emerg] 10464#0: unknown directive &#8220;ssl&#8221; in /usr/local/nginx-0.6.32/conf/nginx.conf:74&#8220;则说明没有将ssl模块编译进nginx，在configure的时候加上&#8221;&#8211;with-http_ssl_module&#8220;即可^^ 至此已经完成了https服务器搭建，但如何让浏览器信任自己颁发的证书呢？ 今天终于研究捣鼓出来了，只要将之前生成的server.crt文件导入到系统的证书管理器就行了，具体方法： 控制面板 -&gt; Internet选项 -&gt;
  


</p>


  <div class="container readlink">
  <a href="http://replace-this-with-your-hugo-site.com/2016/01/10/using_https_in_nginx.html">Read more &rarr;</a>

</div>


</article>

  
    <article class="container content summary">
  <div class="container hat">
  <h2><a href="http://replace-this-with-your-hugo-site.com/2015/12/30/redis-delkey.html">Redis 删除所有键值 | redis,删除key,key
</a>
</h2>

  <time datetime="2015-12-30">30 Dec, 2015</time>

</div>

  <p class="container content">
  
  
    使用命令方式删除所有 redis-cli KEYS &#8220;126.com*&#8221; | xargs redis-cli DEL 使用lua方式 EVAL &#8220;return redis.call(&#8216;del&#8217;, unpack(redis.call(&#8216;keys&#8217;, ARGV[1])))&#8221; 0 *
  


</p>


  <div class="container readlink">
  <a href="http://replace-this-with-your-hugo-site.com/2015/12/30/redis-delkey.html">Read more &rarr;</a>

</div>


</article>

  
    <article class="container content summary">
  <div class="container hat">
  <h2><a href="http://replace-this-with-your-hugo-site.com/2015/12/30/visualstudio-pch.html">Visualstudio 编译不能打开pch文件 | vs2010,visualstudio,pch,预处理
</a>
</h2>

  <time datetime="2015-12-30">30 Dec, 2015</time>

</div>

  <p class="container content">
  
  
    pch文件是vs生成的预编译文件，用来加速编译的。pch文件通常是由stdafx.cpp文件生成的。 如果你删除了这个文件而又实用了预编译选项则会报标题中的错误 Can&#8217;t open xxxx.pch 解决步骤: 工程属性-C/C++预处理-预处理头 选择 使用 Use/Yu 右键工程中的stdafx.cpp属性-C/C++预处理-预处理头 创建 Create/Yc 右键编译stdafx.cpp 此时再编译工程就OK了。
  


</p>


  <div class="container readlink">
  <a href="http://replace-this-with-your-hugo-site.com/2015/12/30/visualstudio-pch.html">Read more &rarr;</a>

</div>


</article>

  
  
<div class="container pagination">
  


<a aria-label="First" href="http://replace-this-with-your-hugo-site.com//">
  <span aria-hidden="true">««</span>
</a>

<a class="disabled" aria-label="Previous" href="#">
  <span aria-hidden="true">«</span>
</a>


<a class="active" href="http://replace-this-with-your-hugo-site.com//">
  1
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/2/">
  2
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/3/">
  3
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/4/">
  4
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/5/">
  5
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/6/">
  6
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/7/">
  7
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/8/">
  8
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/9/">
  9
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/10/">
  10
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/11/">
  11
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/12/">
  12
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/13/">
  13
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/14/">
  14
</a>

<a href="http://replace-this-with-your-hugo-site.com//page/15/">
  15
</a>


<a aria-label="Next" href="http://replace-this-with-your-hugo-site.com//page/2/">
  <span aria-hidden="true">»</span>
</a>

<a aria-label="Last" href="http://replace-this-with-your-hugo-site.com//page/15/">
  <span aria-hidden="true">»»</span>
</a>


</div>


</section>

      <footer id="main-footer" class="container main_footer">
  

  <div class="container nav foot no-print">
  

  <a class="toplink" href="#">back to top</a>

</div>

  <div class="container credits">
  
<div class="container footline">
  
  code with <i class='fa fa-heart'></i>


</div>


  
<div class="container copyright">
  
  &copy; 2016 gsymy.com.


</div>


</div>

</footer>

    </main>
    
<script type="text/javascript">
  (function() {
    
    
    if (window.location.hostname == "localhost")
      return;

    var dsq = document.createElement('script'); dsq.async = true; dsq.type = 'text/javascript';
    dsq.src = '//your_disqus_shortname.disqus.com/count.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>



<script src="http://replace-this-with-your-hugo-site.com/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>



<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'Your Google Analytics tracking code', 'auto');
  ga('send', 'pageview');

</script>


    
  </body>
</html>

